import React, { Component } from "react";
import NavBar from "./Navbar函数组件";
export default class index extends Component {
  state = {};
  render() {
    let colors = {
      bg: "yellow",
    };
    let styles = {
      content: "我是首页",
      leftShow: false,
      rightShow: false,
    };
    let obj = { ...colors, ...styles };
    return (
      <section>
        {/* 传参新写法 */}
        <NavBar {...obj} />
      </section>
    );
  }
}
